home *** CD-ROM | disk | FTP | other *** search
- Path: axl.dialup.fu-berlin.DE!not-for-mail
- From: axl@zedat.fu-berlin.de (Axel Thimm)
- Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
- Subject: Re: float != float and floats as return types
- Date: Tue, 30 Jan 1996 13:19:40 GMT
- Organization: FU Berlin
- Message-ID: <4el5qt$j5j@fu-berlin.de>
- References: <4ej9lb$mpc@fu-berlin.de>
- Reply-To: axl@zedat.fu-berlin.de
- NNTP-Posting-Host: axl.dialup.fu-berlin.de (160.45.218.93)
- X-Access: 16 17 19
- X-Newsreader: Forte Free Agent 1.0.82
-
- Many thanks to all who have answered,
- I have received lots of mail about this.
- The problem is that gcc sometimes uses the coprocessor registers/stack
- to store floating point values. This is done in long double precision
- for i386. This should also happen with 68000 processors. This can be
- turned off in gcc with the following switch, which is rather
- self-explaining.
-
- -ffloat-store
- Do not store floating point variables in registers.
- This prevents undesirable excess precision on ma-
- chines such as the 68000 where the floating regis-
- ters (of the 68881) keep more precision than a dou-
- ble is supposed to have.
-
- For most programs, the excess precision does only
- good, but a few programs rely on the precise defi-
- nition of IEEE floating point. Use `-ffloat-store'
- for such programs.
-
- ===
- Axel Thimm <axl@zedat.fu-berlin.de>
- Freie Universitaet Berlin
- ===
-
-